package Bank;
import java.util.Scanner;
public class Test {
	public static void main(String args[]) {
		Scanner a= new Scanner(System.in);
		Bank.bankName = "建设银行";
		Bank.welcome();
		Bank[] bank= new Bank[1];
		manu();
		int A = a.nextInt();
		while (A <= 4) {
			switch (A) {
			case 1:
				System.out.println("请输入用户姓名：");
				String name = a.next();
				System.out.println("请设置账户密码：");
				int password = a.nextInt();
				System.out.println("请输入开户金额：");
				int money = a.nextInt();
				bank[0] = new Bank(name, password, money);
				break;
			case 2:
				System.out.println("输入存款金额：");
				int money1 = a.nextInt();
				bank[0].deposit(money1);
				break;
			case 3:
				System.out.println("请输入取款密码：");
				int password1 = a.nextInt();
				bank[0].com(password1);
				System.out.println("请输入取款金额：");
				int money2 = a.nextInt();
				bank[0].withdrawal(money2);
				break;
			case 4:
				bank[0].elcomeNext();
				break;
			}
			if (A==4) {
				break;
			}
			manu();
			A = a.nextInt();
		}
	}

	public static void manu() {
		System.out.print("1.开户\n2.存款\n3.取款\n4.退出\n请输入1-4\n");
	}
}